package com.yeyks;

import com.spring4all.swagger.EnableSwagger2Doc;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.util.Date;
import java.util.TimeZone;

/**
 * 服务入口
 * 扫描过滤器
 * @author Administrator
 */
@EnableSwagger2Doc
@MapperScan({"com.yeyks.dao","com.yeyks.*.dal.dao"})
@SpringBootApplication
@EnableScheduling
@ServletComponentScan
public class YyksOpenAdminAppApplication {
    private static Logger LOGGER = LoggerFactory.getLogger(YyksOpenAdminAppApplication.class);
    public static void main(String[] args) {
        //时区设置，避免服务以后放到docker容器中有时差问题
        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
        LOGGER.info("system time:[{}]", new Date().toString());
        LOGGER.info("timezone:[{}]", System.getProperty("user.timezone"));
        SpringApplication.run(YyksOpenAdminAppApplication.class, args);
        LOGGER.info("夜鱼快宿后台管理系统-APP-运行成功:[{}]",new Date().toString());
    }
}